namespace TesteSharepointNovo.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class Nova1 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.Formacaos", "CurriculoViewModel_Id", "dbo.Curriculoes");
            DropForeignKey("dbo.Certificacaos", "CurriculoViewModel_Id", "dbo.Curriculoes");
            DropForeignKey("dbo.Experiencias", "CurriculoViewModel_Id", "dbo.Curriculoes");
            DropForeignKey("dbo.Tecnologias", "CurriculoViewModel_Id", "dbo.Curriculoes");
            DropIndex("dbo.Formacaos", new[] { "CurriculoViewModel_Id" });
            DropIndex("dbo.Certificacaos", new[] { "CurriculoViewModel_Id" });
            DropIndex("dbo.Experiencias", new[] { "CurriculoViewModel_Id" });
            DropIndex("dbo.Tecnologias", new[] { "CurriculoViewModel_Id" });
            DropColumn("dbo.Curriculoes", "PodeEditar");
            DropColumn("dbo.Curriculoes", "Discriminator");
            DropColumn("dbo.Formacaos", "CurriculoViewModel_Id");
            DropColumn("dbo.Certificacaos", "CurriculoViewModel_Id");
            DropColumn("dbo.Experiencias", "CurriculoViewModel_Id");
            DropColumn("dbo.Tecnologias", "CurriculoViewModel_Id");
        }
        
        public override void Down()
        {
            AddColumn("dbo.Tecnologias", "CurriculoViewModel_Id", c => c.Int());
            AddColumn("dbo.Experiencias", "CurriculoViewModel_Id", c => c.Int());
            AddColumn("dbo.Certificacaos", "CurriculoViewModel_Id", c => c.Int());
            AddColumn("dbo.Formacaos", "CurriculoViewModel_Id", c => c.Int());
            AddColumn("dbo.Curriculoes", "Discriminator", c => c.String(nullable: false, maxLength: 128));
            AddColumn("dbo.Curriculoes", "PodeEditar", c => c.Boolean());
            CreateIndex("dbo.Tecnologias", "CurriculoViewModel_Id");
            CreateIndex("dbo.Experiencias", "CurriculoViewModel_Id");
            CreateIndex("dbo.Certificacaos", "CurriculoViewModel_Id");
            CreateIndex("dbo.Formacaos", "CurriculoViewModel_Id");
            AddForeignKey("dbo.Tecnologias", "CurriculoViewModel_Id", "dbo.Curriculoes", "Id");
            AddForeignKey("dbo.Experiencias", "CurriculoViewModel_Id", "dbo.Curriculoes", "Id");
            AddForeignKey("dbo.Certificacaos", "CurriculoViewModel_Id", "dbo.Curriculoes", "Id");
            AddForeignKey("dbo.Formacaos", "CurriculoViewModel_Id", "dbo.Curriculoes", "Id");
        }
    }
}
